class ReverseL extends Piece;

var TwoDArray blocks;

function setUp()
{
	blocks = new class'TwoDArray';
		blocks.setDimensions(4, 4);
	// 0 1 0 0
	// 0 1 0 0
	// 1 1 0 0
	// 0 0 0 0
	blocks.clear();
	blocks.set(0, 1, 1);
	blocks.set(1, 1, 1);
	blocks.set(2, 1, 1);
	blocks.set(2, 0, 1);
}

function setDown()
{
	blocks = new class'TwoDArray';
		blocks.setDimensions(4, 4);
	// 0 1 1 0
	// 0 1 0 0
	// 0 1 0 0
	// 0 0 0 0
	blocks.clear();
	blocks.set(0, 1, 1);
	blocks.set(0, 2, 1);
	blocks.set(1, 1, 1);
	blocks.set(2, 1, 1);
}

function setLeft()
{
	blocks = new class'TwoDArray';
		blocks.setDimensions(4, 4);
	// 0 0 0 0
	// 1 1 1 0
	// 0 0 1 0
	// 0 0 0 0

	blocks.clear();
	blocks.set(1, 0, 1);
	blocks.set(1, 1, 1);
	blocks.set(1, 2, 1);
	blocks.set(2, 2, 1);
}

function setRight()
{
	blocks = new class'TwoDArray';
		blocks.setDimensions(4, 4);
	// 1 0 0 0
	// 1 1 1 0
	// 0 0 0 0
	// 0 0 0 0

	blocks.clear();
	blocks.set(0, 0, 1);
	blocks.set(1, 0, 1);
	blocks.set(1, 1, 1);
	blocks.set(1, 2, 1);
}

function TwoDArray getCurrentBlockArray() {
	switch(super.getIndex()) {
		case 0:
			setUp();
			break;
		case 1: 
			setDown();
			break;
		case 2:
			setLeft();
			break;
		case 3:
			setRight();
			break;
		default:
			setUp();
	}
	return blocks;
}

simulated function BeginPlay()
{
	blocks.setDimensions(4, 4);
}